package cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.service;
import cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.entity.Reward;
import cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.mapper.RewardMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RewardService {
    @Autowired
    private RewardMapper rewardMapper;

    public String save(Reward reward) {
        if (rewardMapper.save(reward)) {
            return "保存成功";
        }
        return "保存失败";
    }

    public String update(Reward reward) {
        if (rewardMapper.update(reward)) {
            return "更新成功";
        }
        return "更新失败";
    }
}